<script src="jquery-2.1.1.min.js"></script>
<script>
  function showDevices(devs){
    console.log(devs);
    for(dev in devs){
      $("#device-select").append($('<option value='+dev+'>'+devs[dev]+'</option>'));
    }
  }
  function rec(){
    js2Qt.startRecord($("#device-select").val())
  }
  function stop(){
    js2Qt.stopRecord();
  }
  function log(data){
	$('.msg-ct').append($("<div>"+data+"</div>"));
  };
</script>
<body>
 <div class=device-select-ct> 	
  <select id=device-select >
  </select>
 </div>
 <div class=record-btn-ct> 	
  <button id=record-start onclick="rec();">Start record</button>
  <button id=record-stop onclick="stop();">Stop record</button>
 </div>
 <div class=msg-ct />
</body>
